package com.ds.infrastructure.hyperspace.console.dao.dao;

import com.ds.infrastructure.hyperspace.console.dao.mapper.TbDeployNodeMapper;
import com.ds.infrastructure.hyperspace.console.entity.page.TbPageWhere;
import com.ds.infrastructure.hyperspace.console.entity.table.TbDeployNode;
import com.ds.infrastructure.hyperspace.console.entity.where.TbCustomWhere;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author: yaozhendong
 * @create: 2019-10-23 11:16
 **/

@Repository
public class TbDeployNodeDao {
    @Autowired
    TbDeployNodeMapper tbDeployNodeMapper;

    public TbDeployNode selectByPrimaryKey(Long id) {
        return tbDeployNodeMapper.selectByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(TbDeployNode record) {
        return tbDeployNodeMapper.updateByPrimaryKeySelective(record);
    }

    public int insertSelective(TbDeployNode record) {
        return tbDeployNodeMapper.insertSelective(record);
    }

    public List<TbDeployNode> selectListForPage(TbDeployNode where, TbCustomWhere mapWhere, TbPageWhere pageWhere) {
        return tbDeployNodeMapper.selectListForPage(where, mapWhere, pageWhere);
    }

    public int selectListForPageCount(TbDeployNode where, TbCustomWhere mapWhere) {
        return tbDeployNodeMapper.selectListForPageCount(where, mapWhere);
    }

    public int insertList(List<TbDeployNode> recordList) {
        if (recordList == null || recordList.isEmpty()) {
            return 0;
        }
        return tbDeployNodeMapper.insertList(recordList);
    }

    public int updateWithDynamicWhere(TbDeployNode record, TbDeployNode where) {
        return tbDeployNodeMapper.updateWithDynamicWhere(record, where);
    }
}
